package com.qutan.app.core;

import com.qutan.app.core.domain.IDEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 留言
 * Created by pengweiyuan on 6/20/16.
 */
@Entity
@Table(name = "message")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class Message extends IDEntity{

    /**
     * 动态的ID
     */
    @Column(columnDefinition = "bigint comment '动态的ID'")
    private long dynamicId;

    /**
     * 留言者的ID
     */
    @Column(columnDefinition = "bigint comment '留言者的ID'")
    private long userId;

    /**
     * 留言者的昵称
     */
    @Column(columnDefinition = "varchar (100) comment '留言者的昵称' ")
    private String userNickName;


    /**
     * 评论内容
     */
    @Column(columnDefinition = "text comment '评论内容' ")
    private String content;


    /**
     * 回复的某条留言ID
     */
    @Column(columnDefinition = "bigint comment '回复的某条留言ID'")
    private long backId;


    /**
     * 回复的某个人的留言的昵称
     */
    @Column(columnDefinition = "varchar (100) comment '回复的某个人的留言的昵称' ")
    private String backUserNickName;


    @Column(columnDefinition = "double comment '纬度' ")
    private double latitude;

    @Column(columnDefinition = "double comment '经度 '")
    private double longtitude;


    public long getDynamicId() {
        return dynamicId;
    }

    public void setDynamicId(long dynamicId) {
        this.dynamicId = dynamicId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getBackId() {
        return backId;
    }

    public void setBackId(long backId) {
        this.backId = backId;
    }

    public String getBackUserNickName() {
        return backUserNickName;
    }

    public void setBackUserNickName(String backUserNickName) {
        this.backUserNickName = backUserNickName;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongtitude() {
        return longtitude;
    }

    public void setLongtitude(double longtitude) {
        this.longtitude = longtitude;
    }

    public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }



}
